doctype html
html(lang="zh_CN")
  head
    meta(charset="utf-8")
    meta(name="description" content=config.description)
    meta(http-equiv="X-UA-Compatible" content="IE=edge")
    meta(name="viewport" content="width=device-width,initial-scale=1,user-scalable=no")
    meta(name="author" content="kdylan")
    title= title + ' - ' + sitename
    link(rel="shortcut icon" href="/public/images/icon.png" type="image/x-icon")
    != Loader('/public/stylesheets/common.min.css').css('/public/stylesheets/common.styl').css('/public/stylesheets/icon.css').css('/public/javascripts/lib/editor/editor.css').css('/public/stylesheets/markdown.css').css('/public/javascripts/lib/webuploader/webuploader.css').css('/public/stylesheets/index.styl').css('/public/stylesheets/atwho.css').done(assets,'', !isDebug)
    block css
  body
    header#header
      .wp
        button.btn.nav-btn#navBtn: span.ico-bars
        //- a.logo(href="/") <b>Js</b> Club <i>js俱乐部</i>
        a.logo(href="/"): img(src="/public/images/logo.png", alt="jsclub" height="30")
        include ./includes/search
        ul.nav-user#navUser 
          li: a(href="/") 首页
          - if (current_user)
            li 欢迎你：
             a(href="/user/" + current_user.username)= current_user.username
            li: a(href="/topic/create") 发表话题
            li: a(href="/user/setting") 设置
            li: a.message(href="/user/message") 消息
              if current_user.messageLen
                span.sub= current_user.messageLen
            li: a(href="/user/logout") 退出
          - else
            li: a(href="/user/register") 注册
            li: a(href="/user/login") 登录
    .wp
      block content
    footer#footer
      .wp 
        p EasyClub - 基于nodejs的轻量级论坛程序
        p by: 
          a(href="http://kdylan.me" target="_blank") kdylan 
          a(href="https://github.com/k-dylan/easyclub/" target="_blank") 源码地址
    != Loader('/public/javascripts/lib/lib.min.js').js('/public/javascripts/lib/jquery.min.js').js('/public/javascripts/jquery.loadData.js').js('/public/javascripts/jquery.modal.js').js('/public/javascripts/main.js').done(assets,null,!isDebug)
    script
      :uglify
        $(function () {
          $('#navBtn').click(function () {
            $('#navUser').slideToggle(200);
          })
        });
        $('#searchForm').submit(function (event) {
          event.preventDefault();
          var query = "site:jsclub.cc+" + $('#searchQuery').val();
          window.open("https://www.google.com.hk/?gws_rd=cr#hl=zh-CN&q=" + query);
        })
    block script
  